package io.github.ilkgunel.util;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class util {
    public static List<String[]> JsonToList(String json){
        ArrayList<String[]> list=new ArrayList<>();
        json=json.substring( 1 ,json.length()-1);json=json.replace("[","#").replace("]","##");
        String str[]=json.split("##,#");
        for (int i = 0; i <str.length ; i++){
            list.add(str[i].replace("#","").split(","));
        }
        return list;
    }


    /*public static void main(String[] args) {
        String dragDeptList="[[1,3],[23,44],[34,23]]";

        List<String[]> list=JsonToList(dragDeptList);for (int i = 0; i <list.size() ; i++){
            System.out.println(Arrays.toString(list.get(i)));}


    }
*/
}
